import requests from '../request';

/*
* const test=()=>{
*   return requests({url:'',method:''})
* }*/

//查所有收入记录
export const findAllIncome=(userid)=>{
    return requests({url:`/incomeFindAll/${userid}`,method:'get'})
}

//添加一条收入记录
export const addIncomeDetail=(from)=>{
    return requests({url:'/addIncome',method:'put',data:from})
}
//删除一条收入记录
export const deleteIncome=(id)=>{
    return requests({url:`/deleteIncome/${id}`,method:'delete'})
}
//更新一条收入记录
export const updateIncome=(form)=>{
    return requests({url:'/updateIncome',method:'post',data:form})
}
//按条件查询收入记录
export const queryIncome=(userInfo,typeIncome,start,end)=>{
    return requests({url:`/queryIncomeByCondition?typeIncome=${typeIncome}&start=${start}&end=${end}`,method:'post',data:userInfo})
}